<!--
  Generated template for the TaskPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
  <ion-navbar>
    <ion-icon name="contact" style="font-size:2em;color: #FFF;margin-left:0.8rem;margin-top:0.3rem;"></ion-icon>
    <span class="title-user">{{securityService.user.userName}}</span>
    <ion-buttons end>
      <!--<button ion-button clear small icon-end>
        <span class="right-button">已完成</span>
        <ion-icon class="task-arrow-down" name="arrow-down"></ion-icon>
      </button>
      <button class="task-add-btn" ion-button icon-only (click)="addScheduleRow()">
        <ion-icon name="add"></ion-icon>
      </button>-->
    </ion-buttons>
  </ion-navbar>
</ion-header>

<ion-content>
  <div class="search-bar-content">
    <ion-searchbar placeholder="搜索" (ionInput)="searchWork()" [(ngModel)]="workInput">
    </ion-searchbar>
  </div>

  <ion-refresher (ionRefresh)="gztaskview.doRefresh($event,editData)">
    <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="下拉刷新" refreshingSpinner="circles" refreshingText="刷新中...">
    </ion-refresher-content>
  </ion-refresher>
  <ion-list class="bhq-list">
    <ion-item class="bhq-item" *ngFor="let item of gztaskview.datas" (click)="toQueryTask(item)">
      <ion-thumbnail item-start>
        <img src="assets/imgs/{{item.picname}}.png">
      </ion-thumbnail>
      <h2 class="bhq-item-title">{{item.zhuti | asLength:12}}</h2>
      <div class="bhq-item-content">
        <div class="bhq-item-info">
          <p>{{item.cjrmc}}</p>
        </div>
        <div class="bhq-item-date">
          <p>{{item.cjsj | asDate}}</p>
        </div>
      </div>
    </ion-item>
  </ion-list>

  <!-- 无级滚动效果实现 -->
  <ion-infinite-scroll (ionInfinite)="worklist.doInfinite($event,editData)">
    <ion-infinite-scroll-content></ion-infinite-scroll-content>
  </ion-infinite-scroll>
</ion-content>